﻿using Mengsk.ProxyDelivery.Domain;
using Mengsk.ProxyDelivery.Print.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mengsk.ProxyDelivery.Print.ViewModels
{
    class PrintHistoryGroupViewModel
    {
        public string DeliveryTitle { get; set; }

        public List<PrintHistoryViewModel> OrderViewModels { get; set; }

        public PrintHistoryGroupViewModel(PrintHistory[] orders)
        {
            this.DeliveryTitle = orders[0].DeliveryTemplateName;
            this.OrderViewModels = new List<PrintHistoryViewModel>();
            this.OrderViewModels.AddRange(orders.Select(obj => new PrintHistoryViewModel(obj)));
        }
    }
}
